<template>
  <div class="recommendMusic w">
    <div
      class="recommendMusicItem"
      v-for="item in recommendLists"
      :key="item.id"
    >
      <div class="left">
        <img :src="item.picUrl" alt="" />
      </div>
      <div class="center">
        <div class="songName">{{ item.name }}</div>
        <div class="songProfile">
          <i class="iconfont icon-wusunyinzhi-copy"></i>
          <span class="album">{{ item.song.album.name }}</span>
        </div>
      </div>
      <div class="right">
        <i class="iconfont icon-jiantou"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "RecommendMusic",
  props: {
    recommendLists: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style lang="scss" scoped>
.recommendMusic {
  .recommendMusicItem {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    .left {
      width: 5rem;
      height: 5rem;
      img {
        width: 5rem;
        height: 5rem;
        border-radius: 0.3rem;
      }
    }
    .center {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      height: 5rem;
      padding: 0.5rem 0 0.5rem 0.5rem;
      overflow: hidden;
      .songName {
        font-size: 1rem;
        color: #1a1a1a;
      }
      .songProfile {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        font-size: 0.8rem;
        i {
          margin-right: 0.4rem;
          font-size: 1rem;
          color: #eac373;
        }
      }
    }
    .right {
      width: 1rem;
      height: 5rem;
      text-align: center;
      line-height: 5rem;
      font-weight: 700;
    }
  }
}
</style>
